// 
// Decompiled by Procyon v0.5.36
// 

package com.cyberfend.cyfsecurity.a;

import java.security.interfaces.*;
import android.util.*;
import java.security.spec.*;
import java.security.*;
import javax.crypto.*;

public final class b
{
    public static java.security.interfaces.RSAPublicKey a(final java.lang.String s) throws com.cyberfend.cyfsecurity.a.b.a {
        try {
            return (java.security.interfaces.RSAPublicKey)java.security.KeyFactory.getInstance("RSA").generatePublic(new java.security.spec.X509EncodedKeySpec(android.util.Base64.decode(s, 0)));
        }
        catch (java.security.spec.InvalidKeySpecException | java.security.NoSuchAlgorithmException ex) {
            final java.lang.Object o;
            throw new com.cyberfend.cyfsecurity.a.b.a((java.lang.Throwable)o);
        }
    }
    
    public static byte[] a(final byte[] array, final java.security.interfaces.RSAPublicKey rsaPublicKey) throws com.cyberfend.cyfsecurity.a.b.a {
        try {
            final javax.crypto.Cipher instance;
            (instance = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING")).init(1, rsaPublicKey);
            return instance.doFinal(array);
        }
        catch (java.security.InvalidKeyException | java.security.NoSuchAlgorithmException | javax.crypto.NoSuchPaddingException | javax.crypto.IllegalBlockSizeException | javax.crypto.BadPaddingException ex) {
            final java.lang.Object o;
            throw new com.cyberfend.cyfsecurity.a.b.a((java.lang.Throwable)o);
        }
    }
    
    public static final class a extends java.lang.Exception
    {
        public a(final java.lang.Throwable t) {
            super(t);
        }
    }
}
